package cn.autoOffice.service.impl;
/*
 *功能说明：请假业务实现类
 *@author 皮永浪
 *@Date 2023/3/29 10:49
 */

import cn.autoOffice.bean.pojo.Leave;
import cn.autoOffice.mapper.LeaveMapper;
import cn.autoOffice.service.LeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LeaveServiceImpl implements LeaveService{

    @Autowired
    private LeaveMapper leaveMapper;

    //添加请假信息
    @Override
    public boolean addLeaveInfo(Leave leave) {
        return leaveMapper.addLeaveInfo(leave);
    }

    //查看专属的请假信息
    @Override
    public List<Leave> findExclusiveLeave(String empName) {
        return leaveMapper.findExclusiveLeave(empName);
    }

    //更改审批状态
    @Override
    public boolean updateLeaveState(Leave leave) {
        return leaveMapper.updateLeaveState(leave);
    }
}
